import request from '@/utils/request';

/** 获取表单数据 */
export const formTableApi = (data) => {
  return request({
    method: 'POST',
    url: '/activity/pageConditionQueryByCreatorId',
    data,
  });
};

/**  创建活动 获取 地区选择接口 */
export const formAddressApi = (data) => {
  return request({
    method: 'POST',
    url: '/address/queryAddressForFourLinkage',
    data,
  });
};

/** 创建活动 接口 保存的  */
export const formCreateActivity = (data) => {
  return request({
    method: 'POST',
    url: '/activity/addActivity',
    data,
  });
};

/** 创建活动  接口 保存草稿  */
export const formSaveDrafts = (data) => {
  return request({
    method: 'POST',
    url: '/activity/saveDrafts',
    data,
  });
};

/** 创建活动  接口 编辑  */
export const activityDetailApi = (data) => {
  return request({
    method: 'POST',
    url: '/activity/queryByUpdate',
    data,
  });
};

/** 活动详情  自读 */
export const activityLookDetailApi = (data) => {
  return request({
    method: 'POST',
    url: '/activity/queryByUpdate',
    data,
  });
};

/** 活动 table 页面  删除 对应的 item */
export const activityDeleteIdApi = (data) => {
  return request({
    method: 'POST',
    url: '/activity/batchDeleteActivity',
    data,
  });
};
